﻿using System.Collections.Generic;
using System.Web.Mvc;
using BLL.Security;
using BLL.Services.Responses;

namespace Web.Models.Responses
{
    public class BookResponsesModel
    {
        public BookResponsesModel(IEnumerable<BookResponse> responses)
        {
            Responses = responses;
            IsShowResponse = EnvironmentContext.User != null;
        }

        public IEnumerable<BookResponse> Responses { get; set; }

        public bool IsShowResponse { get; set; }

        protected static IEnvironmentContext EnvironmentContext
        {
            get { return DependencyResolver.Current.GetService<IEnvironmentContext>(); }
        }
    }
}